package com.bop.dehong.http.model;

import java.lang.reflect.Type;

import android.app.Activity;

import com.base.dehong.http.HttpRequest;
import com.base.dehong.http.RequestCallBack;
import com.bop.dehong.config.Config;
import com.bop.dehong.info.entity.VersionEntity;
import com.google.gson.reflect.TypeToken;
/**
 * 检查版本
 * 
 */
public class UpdateApkModel extends HttpRequest<VersionEntity>{

	public UpdateApkModel(Activity activity, RequestCallBack<VersionEntity> callback) {
		super(activity, callback);
		// TODO Auto-generated constructor stub
	}

	@Override
	public String getURL() {
		// TODO Auto-generated method stub
		return Config.getIP() + Config.getUpdateUrl();
	}
	public void doNet() {
		mPostValues.put("a", "version");
		mPostValues.put("m", "Index");	
		mPostValues.put("platform", "1");
		requestByPost();
	}
	
	public Type getType(){
		return new TypeToken<VersionEntity>() {}.getType();
	}

	@Override
	public Class<VersionEntity> getClazz()
	{
		return VersionEntity.class;
	}

}
